home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / dev / basic / ace24dist.lha / ace24.lha / include / graphics / View.h < prev   
C/C++ Source or Header  |  1996-09-10  |  10KB  |  337 lines

  1. #ifndef GRAPHICS_VIEW_H
  2. #define GRAPHICS_VIEW_H 1
  3. /*
  4. ** view.h for ACE Basic
  5. **
  6. ** Note: Translated to ACE by ConvertC2ACE
  7. **       @ MapMeadow Software, Nils Sjoholm
  8. **
  9. **
  10. ** Date: 09/01/95
  11. **
  12. **
  13. */
  14.  
  15. /*
  16. ** This are the StructPointer defines for view.h
  17. */
  18. #ifndef ColorMapPtr
  19. #define ColorMapPtr ADDRESS
  20. #endif
  21. #ifndef DBufInfoPtr
  22. #define DBufInfoPtr ADDRESS
  23. #endif
  24. #ifndef PaletteExtraPtr
  25. #define PaletteExtraPtr ADDRESS
  26. #endif
  27. #ifndef RasInfoPtr
  28. #define RasInfoPtr ADDRESS
  29. #endif
  30. #ifndef ViewPtr
  31. #define ViewPtr ADDRESS
  32. #endif
  33. #ifndef ViewExtraPtr
  34. #define ViewExtraPtr ADDRESS
  35. #endif
  36. #ifndef ViewPortPtr
  37. #define ViewPortPtr ADDRESS
  38. #endif
  39. #ifndef ViewPortExtraPtr
  40. #define ViewPortExtraPtr ADDRESS
  41. #endif
  42. /*
  43. ** End of StructPointer defines for view.h
  44. */
  45.  
  46.  
  47. #define ECS_SPECIFIC
  48.  
  49. #ifndef EXEC_TYPES_H
  50. #include <exec/types.h>
  51. #endif
  52.  
  53. #ifndef EXEC_SEMAPHORES_H
  54. #include <exec/semaphores.h>
  55. #endif
  56.  
  57. #ifndef GRAPHICS_GFX_H
  58. #include <graphics/gfx.h>
  59. #endif
  60.  
  61. #ifndef GRAPHICS_COPPER_H
  62. #include <graphics/copper.h>
  63. #endif
  64.  
  65. #ifndef GRAPHICS_GFXNODES_H
  66. #include <graphics/gfxnodes.h>
  67. #endif
  68.  
  69. #ifndef GRAPHICS_MONITOR_H
  70. #include <graphics/monitor.h>
  71. #endif
  72.  
  73. #ifndef GRAPHICS_DISPLAYINFO_H
  74. #include <graphics/displayinfo.h>
  75. #endif
  76.  
  77. #ifndef HARDWARE_CUSTOM_H
  78. #include <hardware/custom.h>
  79. #endif
  80.  
  81. STRUCT ViewPort
  82.  
  83.     ViewPortPtr  _Next 
  84.     ColorMapPtr  ColorMap  /* table of colors for this viewport */
  85.                     /* if this is nil,  MakeVPort assumes default values */
  86.     CopListPtr  DspIns    /* used by MakeVPort() */
  87.     CopListPtr  SprIns    /* used by sprite stuff */
  88.     CopListPtr  ClrIns    /* used by sprite stuff */
  89.     UCopListPtr  UCopIns   /* User copper list */
  90.     SHORTINT    DWidth 
  91.     SHORTINT  DHeight 
  92.     SHORTINT    DxOffset 
  93.     SHORTINT  DyOffset 
  94.     SHORTINT   Modes 
  95.     BYTE    SpritePriorities 
  96.     BYTE    ExtendedModes 
  97.     RasInfoPtr  RasInfo 
  98. END STRUCT 
  99.  
  100. STRUCT View
  101.  
  102.     ViewPortPtr  ViewPort 
  103.     cprlistPtr  LOFCprList    /* used for interlaced and noninterlaced */
  104.     cprlistPtr  SHFCprList    /* only used during interlace */
  105.     SHORTINT    DyOffset 
  106.     SHORTINT  DxOffset    /* for complete View positioning */
  107.                    /* offsets are +- adjustments to standard #s */
  108.     SHORTINT   Modes          /* such as INTERLACE,  GENLOC */
  109. END STRUCT 
  110.  
  111. /* these structures are obtained via GfxNew */
  112. /* and disposed by GfxFree */
  113. STRUCT ViewExtra
  114.  
  115.     ExtendedNode n 
  116.     ViewPtr  View       /* backwards link */
  117.     MonitorSpecPtr  Monitor     /* monitors for this view */
  118.     SHORTINT TopLine 
  119. END STRUCT 
  120.  
  121. /* this structure is obtained via GfxNew */
  122. /* and disposed by GfxFree */
  123. STRUCT ViewPortExtra
  124.  
  125.     ExtendedNode n 
  126.     ViewPortPtr  ViewPort   /* backwards link */
  127.     Rectangle DisplayClip    /* MakeVPort display clipping information */
  128.     /* These are added for V39 */
  129.     ADDRESS   VecTable         /* Private */
  130.     STRING DriverData SIZE 8  /*  2*SIZEOF(ADDRESS) */
  131.     SHORTINT  Flags 
  132.     STRING Origin SIZE 8          /* First visible POINT relative TO the DClip.
  133.                      * One for each possible playfield.
  134.                      */
  135.     LONGINT cop1ptr           /* private */
  136.     LONGINT cop2ptr           /* private */
  137. END STRUCT 
  138.  
  139. /* All these VPXF_ flags are private */
  140. #define VPXB_FREE_ME        0
  141. #define VPXF_FREE_ME        (1)
  142. #define VPXB_LAST       1
  143. #define VPXF_LAST       (2)
  144. #define VPXB_STRADDLES_256  4
  145. #define VPXF_STRADDLES_256  (16)
  146. #define VPXB_STRADDLES_512  5
  147. #define VPXF_STRADDLES_512  (32)
  148.  
  149.  
  150. #define EXTEND_VSTRUCT  &H1000  /* unused bit in Modes field of View */
  151.  
  152. #define VPF_A2024         &H40  /* VP?_ fields internal only */
  153. #define VPF_TENHZ         &H20
  154. #define VPB_A2024         6
  155. #define VPB_TENHZ         4
  156.  
  157. /* defines used for Modes in IVPargs */
  158.  
  159. #define GENLOCK_VIDEO   &H0002
  160. #define LACE        &H0004
  161. #define DOUBLESCAN  &H0008
  162. #define SUPERHIRES  &H0020
  163. #define PFBA        &H0040
  164. #define EXTRA_HALFBRITE &H0080
  165. #define GENLOCK_AUDIO   &H0100
  166. #define DUALPF      &H0400
  167. #define HAM     &H0800
  168. #define EXTENDED_MODE   &H1000
  169. #define VP_HIDE &H2000
  170. #define SPRITES &H4000
  171. #define HIRES       &H8000
  172.  
  173. STRUCT RasInfo  /* used by callers to and InitDspC() */
  174.  
  175.    RasInfoPtr  _Next       /* used for dualpf */
  176.    BitMapPtr  BitMap 
  177.    SHORTINT    RxOffset 
  178.    SHORTINT  RyOffset       /* scroll offsets in this BitMap */
  179. END STRUCT 
  180.  
  181. STRUCT ColorMap
  182.  
  183.     BYTE    Flags 
  184.     BYTE    _Type 
  185.     SHORTINT   Count 
  186.     ADDRESS    ColorTable 
  187.     ViewPortExtraPtr  cm_vpe 
  188.     ADDRESS    LowColorBits 
  189.     BYTE    TransparencyPlane 
  190.     BYTE    SpriteResolution 
  191.     BYTE    SpriteResDefault    /* what resolution you get when you have set SPRITERESN_DEFAULT */
  192.     BYTE    AuxFlags 
  193.     ViewPortPtr  cm_vp 
  194.     ADDRESS    NormalDisplayInfo 
  195.     ADDRESS    CoerceDisplayInfo 
  196.     TagItemPtr  cm_batch_items 
  197.     LONGINT   VPModeID 
  198.     PaletteExtraPtr  PalExtra 
  199.     SHORTINT   SpriteBase_Even 
  200.     SHORTINT   SpriteBase_Odd 
  201.     SHORTINT   Bp_0_base 
  202.     SHORTINT   Bp_1_base 
  203.  
  204. END STRUCT 
  205.  
  206. /* if Type == 0 then ColorMap is V1.2/V1.3 compatible */
  207. /* if Type != 0 then ColorMap is V38       compatible */
  208. /* the system will never create other than V39 type colormaps when running V39 */
  209.  
  210. #define COLORMAP_TYPE_V1_2  &H00
  211. #define COLORMAP_TYPE_V1_4  &H01
  212. #define COLORMAP_TYPE_V36 COLORMAP_TYPE_V1_4    /* use this definition */
  213. #define COLORMAP_TYPE_V39   &H02
  214.  
  215. /* Flags variable */
  216. #define COLORMAP_TRANSPARENCY   &H01
  217. #define COLORPLANE_TRANSPARENCY &H02
  218. #define BORDER_BLANKING     &H04
  219. #define BORDER_NOTRANSPARENCY   &H08
  220. #define VIDEOCONTROL_BATCH  &H10
  221. #define USER_COPPER_CLIP    &H20
  222. #define BORDERSPRITES   &H40
  223.  
  224. #define CMF_CMTRANS 0
  225. #define CMF_CPTRANS 1
  226. #define CMF_BRDRBLNK    2
  227. #define CMF_BRDNTRAN    3
  228. #define CMF_BRDRSPRT    6
  229.  
  230. #define SPRITERESN_ECS      0
  231. /* ^140ns,  except in 35ns viewport,  where it is 70ns. */
  232. #define SPRITERESN_140NS    1
  233. #define SPRITERESN_70NS     2
  234. #define SPRITERESN_35NS     3
  235. #define SPRITERESN_DEFAULT  -1
  236.  
  237. /* AuxFlags : */
  238. #define CMAB_FULLPALETTE 0
  239. #define CMAF_FULLPALETTE (1)
  240. #define CMAB_NO_INTERMED_UPDATE 1
  241. #define CMAF_NO_INTERMED_UPDATE (2)
  242. #define CMAB_NO_COLOR_LOAD 2
  243. #define CMAF_NO_COLOR_LOAD (4)
  244. #define CMAB_DUALPF_DISABLE 3
  245. #define CMAF_DUALPF_DISABLE (8)
  246.  
  247.  
  248. STRUCT PaletteExtra             /* structure may be extended so watch out! */
  249.  
  250.     SignalSemaphore pe_Semaphore         /* shared semaphore for arbitration */
  251.     SHORTINT   pe_FirstFree                /* *private*                */
  252.     SHORTINT   pe_NFree                /* number of free colors        */
  253.     SHORTINT   pe_FirstShared              /* *private*                */
  254.     SHORTINT   pe_NShared              /* *private*                */
  255.     ADDRESS   pe_RefCnt              /* *private*                */
  256.     ADDRESS   pe_AllocList               /* *private*                */
  257.     ViewPortPtr  pe_ViewPort            /* back pointer to viewport     */
  258.     SHORTINT   pe_SharableColors           /* the number of sharable colors.   */
  259. END STRUCT 
  260.  
  261. /* flags values for ObtainPen */
  262.  
  263. #define PENB_EXCLUSIVE 0
  264. #define PENB_NO_SETCOLOR 1
  265.  
  266. #define PENF_EXCLUSIVE (2&)
  267. #define PENF_NO_SETCOLOR (2)
  268.  
  269. /* obsolete names for PENF_xxx flags: */
  270.  
  271. #define PEN_EXCLUSIVE PENF_EXCLUSIVE
  272. #define PEN_NO_SETCOLOR PENF_NO_SETCOLOR
  273.  
  274. /* precision values for ObtainBestPen : */
  275.  
  276. #define PRECISION_EXACT -1
  277. #define PRECISION_IMAGE 0
  278. #define PRECISION_ICON  16
  279. #define PRECISION_GUI   32
  280.  
  281.  
  282. /* tags for ObtainBestPen: */
  283. #define OBP_Precision &H84000000
  284. #define OBP_FailIfBad &H84000001
  285.  
  286. /* From V39,  MakeVPort() will return an error if there is not enough memory, 
  287.  * or the requested mode cannot be opened with the requested depth with the
  288.  * given bitmap (for higher bandwidth alignments).
  289.  */
  290.  
  291. #define MVP_OK      0   /* you want to see this one */
  292. #define MVP_NO_MEM  1   /* insufficient memory for intermediate workspace */
  293. #define MVP_NO_VPE  2   /* ViewPort does not have a ViewPortExtra,  and
  294.                  * insufficient memory to allocate a temporary one.
  295.                  */
  296. #define MVP_NO_DSPINS   3   /* insufficient memory for intermidiate copper
  297.                  * instructions.
  298.                  */
  299. #define MVP_NO_DISPLAY  4   /* BitMap data is misaligned for this viewport's
  300.                  * mode and depth - see AllocBitMap().
  301.                  */
  302. #define MVP_OFF_BOTTOM  5   /* PRIVATE - you will never see this. */
  303.  
  304. /* From V39,  MrgCop() will return an error if there is not enough memory, 
  305.  * or for some reason MrgCop() did not need to make any copper lists.
  306.  */
  307.  
  308. #define MCOP_OK     0   /* you want to see this one */
  309. #define MCOP_NO_MEM 1   /* insufficient memory to allocate the system
  310.                  * copper lists.
  311.                  */
  312. #define MCOP_NOP    2   /* MrgCop() did not merge any copper lists
  313.                  * (eg,  no ViewPorts in the list,  or all marked as
  314.                  * hidden).
  315.                  */
  316.  
  317. STRUCT DBufInfo  
  318.     ADDRESS    dbi_Link1 
  319.     LONGINT   dbi_Count1 
  320.     _Message dbi_SafeMessage      /* replied to when safe to write to old bitmap */
  321.     ADDRESS dbi_UserData1          /* first user data */
  322.  
  323.     ADDRESS    dbi_Link2 
  324.     LONGINT   dbi_Count2 
  325.     _Message dbi_DispMessage  /* replied to when new bitmap has been displayed at least
  326.                             once */
  327.     ADDRESS    dbi_UserData2           /* second user data */
  328.     LONGINT   dbi_MatchLong 
  329.     ADDRESS    dbi_CopPtr1 
  330.     ADDRESS    dbi_CopPtr2 
  331.     ADDRESS    dbi_CopPtr3 
  332.     SHORTINT   dbi_BeamPos1 
  333.     SHORTINT   dbi_BeamPos2 
  334. END STRUCT 
  335.  
  336. #endif  /* GRAPHICS_VIEW_H */
  337.